package com.hhss.qishi.DPtest.designpattern.factory.store;

import com.hhss.qishi.DPtest.designpattern.factory.ingredient.MASPizzaIngredientFactory;
import com.hhss.qishi.DPtest.designpattern.factory.pizza.MASStyleCheesePizza;
import com.hhss.qishi.DPtest.designpattern.factory.pizza.Pizza;

/**
 * 马鞍山加盟店
 */
public class MASPizzaStore extends PizzaStore {

    private Pizza pizza;

    @Override
    Pizza createPizza(String pizzaTypa) {
        if("cheese".equals(pizzaTypa)){
            MASPizzaIngredientFactory factory = new MASPizzaIngredientFactory();
            pizza = new MASStyleCheesePizza(factory);
        }
        return pizza;
    }
}
